import request from '@/utils/request'
export function getUserInfo(data) {
  return request({
    url: '/userservice/user/userInfo',
    method: 'get',
    headers: {
      'Content-Type': 'application/json'
    },
    data
  })
}
export function getMenuRouter(data) {
  return request({
    url: '/userservice/menu/list',
    method: 'get',
    headers: {
      'Content-Type': 'application/json'
    },
    data
  })
}

export function Pislogin(data) {
  console.log("开始验证我的登录");
  return request({
    url: '/api/oauth/PisLogin',
    method: 'post',
    headers: {
      'Content-Type': 'application/x-www-form-urlencoded'
    },
    data
  })
}
// 获取当前用户信息
export function getInfo() {
  return request({
    url: '/api/oauth/CurrentUser',
    method: 'get',
  })
}

// 退出登录
export function logout() {
  return request({
    url: '/api/oauth/Logout',
    method: 'get'
  })
}

// 锁屏解锁登录
export function unlock(data) {
  return request({
    url: '/api/oauth/LockScreen',
    method: 'post',
    data
  })
}
export function getPermissions(data) {
  return request({
    url: '/api/Login/GetPermissions',
    method: 'get',
    data
  })
}

